 create table if not exists jms_dm.dm_mng_thd_flase_send_waybill_detail_dt
(
    first_duty_type         varchar(100) comment '首责任类型',
    first_duty_network_code varchar(100) comment '首责任机构code',
    first_duty_agent_code   varchar(100) comment '首责任机构代理区code',
    waybill_no              varchar(100) comment '运单号',
    input_time              varchar(100) comment '运单录入时间',
    date_time               date comment '运单录入日期',
    first_duty_network_name varchar(100) comment '首责任机构name',
    first_duty_network_type int comment '首责任机构网点类型',
    first_duty_agent_name   varchar(100) comment '首责任机构代理区name',
    first_duty_standard     varchar(100) comment '首责任标准',
    first_network_scantime  varchar(100) comment '首机构操作时间	',
    first_network_code      varchar(100) comment '首机构操作网点',
    first_network_name      varchar(100) comment '首机构操作网点name',
    first_agent_code        varchar(100) comment '始发代理区',
    first_agent_name        varchar(100) comment '始发代理区name',
    first_city_id           varchar(100) comment '始发城市id',
    first_city_desc         varchar(100) comment '始发城市name',
    first_province_id       varchar(100) comment '始发省份id',
    first_province_desc     varchar(100) comment '始发省份name',
    end_network_code        varchar(100) comment '目的网点',
    end_network_name        varchar(100) comment '目的网点',
    end_agent_code          varchar(100) comment '目的代理区',
    end_agent_name          varchar(100) comment '目的代理区',
    end_city_id             varchar(100) comment '目的城市id',
    end_city_desc           varchar(100) comment '目的城市name',
    end_province_id         varchar(100) comment '目的省份id',
    end_province_desc       varchar(100) comment '目的省份name',
    track_link              varchar(600) comment '链路环节',
    all_duty_network_code   varchar(100) comment '责任机构',
    all_duty_network_name   varchar(100) comment '责任机构',
    duration                varchar(100) comment '时长',
    out_network_code        varchar(100) comment '出仓网点',
    out_network_name        varchar(100) comment '出仓网点',
    out_city_id             varchar(100) comment '出仓城市id',
    out_city_desc           varchar(100) comment '出仓城市name',
    out_province_id         varchar(100) comment '出仓省份id',
    out_province_desc       varchar(100) comment '出仓省份name',
    sign_time               varchar(100) comment '签收时间',
    all_duty_standard       varchar(100) comment '任标准',
    all_duty_type           varchar(100) comment '责任类型',
    all_trace_falg          varchar(100) comment '问题环节',
    track_link_code         varchar(100) comment '链路环节code',
    batch_no                varchar(100) comment '批次号',
    is_manual               varchar(100) comment '是否手工上传',
    update_time             varchar(100) comment '更新时间'
) ENGINE=OLAP
DUPLICATE KEY(
 first_duty_type,first_duty_network_code,first_duty_agent_code
)
COMMENT "春节不打烊-桃花岛虚假发货明细"
PARTITION BY RANGE(date_time)(
START ('2023-12-01') END ('2024-02-10') EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(waybill_no) BUCKETS 2
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "2",
"in_memory" = "false",
"storage_format" = "V2"
);